package wechat.rcv.cosuming

import org.apache.log4j.Logger
import org.eclipse.xtend.lib.Property
import org.junit.Test
import org.junit.Ignore

class MessageTest{	
	@Property String id 
	static Logger logger = Logger::getLogger("MessageTest")
	
	
	@Test
	@Ignore	
	def void dslparseRequestTest(){
		val request = '
		 <xml>
	 <ToUserName><![CDATA[toUser]]></ToUserName>
	 <FromUserName><![CDATA[FromUser]]></FromUserName>
	 <CreateTime>123456789</CreateTime>
	 <MsgType><![CDATA[event]]></MsgType>
	 <Event><![CDATA[CLICK]]></Event>
	 </xml>'
//	 <EventKey><![CDATA[EVENTKEY]]></EventKey>
//	 <AgentID>1</AgentID>
		val ro = new RequestObj(request)=>[
			println(toUserName)
			println(fromUserName)
			println(msgType)
			println(createTime)
			println(event)
			println(eventKey)

		]
//		print(WXRequestTree::getHandler(ro).acceptAsync)
	}
	
	@Test
	@Ignore
	def void eventClickTreeTest(){
		val request = '
		 <xml>
	 <ToUserName><![CDATA[toUser]]></ToUserName>
	 <FromUserName><![CDATA[FromUser]]></FromUserName>
	 <CreateTime>123456789</CreateTime>
	 <MsgType><![CDATA[event]]></MsgType>
	 <Event><![CDATA[SCAN]]></Event>
	 </xml>'
//	 <EventKey><![CDATA[EVENTKEY]]></EventKey>
//	 <AgentID>1</AgentID>
		val ro = new RequestObj(request)=>[
			println(toUserName)
			println(fromUserName)
			println(msgType)
			println(createTime)
			println(event)
			println(eventKey)

		]
//		print(WXRequestTree::getHandler(ro).acceptAsync)
	}	
	@Test
	@Ignore
	def void eventClickTreeTest2(){
		val request = '
		 <xml>
	 <ToUserName><![CDATA[toUser]]></ToUserName>
	 <FromUserName><![CDATA[FromUser]]></FromUserName>
	 <CreateTime>123456789</CreateTime>
	 <MsgType><![CDATA[event]]></MsgType>
	 <Event><![CDATA[subscribe]]></Event>
	 </xml>'
//	 <EventKey><![CDATA[EVENTKEY]]></EventKey>
//	 <AgentID>1</AgentID>
		val ro = new RequestObj(request)=>[
			println(toUserName)
			println(fromUserName)
			println(msgType)
			println(createTime)
//			println(event)
//			println(eventKey)
		]
//		print(WXRequestTree::getHandler(ro).acceptAsync)
	}
}